cd "C:\Users\mhoro\Dropbox\Smart Bombs MID Data Creation"
set more off
clear all
estimates clear
grstyle init
grstyle set plain
* colorpalette #259797 #db4437
graph set window fontface "Times New Roman"

log using SmartombsPaperResults.log, replace

use SmartBombsPaperJCRSubmission.dta, clear

* Time series setup
xtset ccode year, yearly

* Figure 1 was built using the raw data in the paper with the pgm2 variable in GIS by hand, so there is no specific replication file. The result can be replicated in R with this: https://ggplot2-book.org/maps.html

*Table 2: No Interaction
eststo m1: logit pgm2 lagroll_internal_conflict_intens lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i, robust cluster(ccode)
eststo m2: logit pgm2 lagroll_internal_conflict_intens lagtotal_borders lagtreaties_signed lagpolity2 loglaggdppc_i, robust cluster(ccode)
eststo m4: regress log_pgm_count lagroll_internal_conflict_intens lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i, robust cluster(ccode)
eststo m5: regress log_pgm_count lagroll_internal_conflict_intens lagtotal_borders lagtreaties_signed lagpolity2 loglaggdppc_i, robust cluster(ccode)

esttab m1 m2 m4 m5 using Table2.rtf, replace t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_internal_conflict_intens lagroll_avg_hostlev lagtotal_borders loglaggdppc_i lagtreaties_signed lagpolity2) eqlabel(none)

esttab m1 m2 m4 m5 using Table2.tex, replace f t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared") legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_internal_conflict_intens lagroll_avg_hostlev lagtotal_borders loglaggdppc_i lagtreaties_signed lagpolity2) mtitles("\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}") eqlabel(none)

estimates clear

* Table 3: Main Interactions

xtset ccode year, yearly

eststo m1: xtlogit pgm2 lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens democinternalconflict loglaggdppc_i, re
eststo m2: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens democinternalconflict loglaggdppc_i i.year, fe
eststo m3: xtlogit pgm2 lagroll_internal_conflict_intens lagtreaties_signed lagdemoc lagroll_avg_hostlev democexternalconflict loglaggdppc_i, re
eststo m4: xtreg log_pgm_count lagroll_internal_conflict lagtreaties_signed lagdemoc lagroll_avg_hostlev democexternalconflict loglaggdppc_i i.year, fe
eststo m5: xtlogit pgm2 lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens treatiesinternalconflict loglaggdppc_i, re
eststo m6: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens treatiesinternalconflict loglaggdppc_i i.year, fe
eststo m7: xtlogit pgm2 lagroll_internal_conflict_intens lagtreaties_signed lagdemoc lagroll_avg_hostlev treatiesexternalconflict loglaggdppc_i, re
eststo m8: xtreg log_pgm_count lagroll_internal_conflict lagtreaties_signed lagdemoc lagroll_avg_hostlev treatiesexternalconflict loglaggdppc_i i.year, fe

esttab m1 m2 m3 m4 m5 m6 m7 m8 using Table3.rtf, replace t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict treatiesinternalconflict treatiesexternalconflict) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict treatiesinternalconflict treatiesexternalconflict)

esttab m1 m2 m3 m4 m5 m6 m7 m8 using Table3.tex, replace f t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict treatiesinternalconflict treatiesexternalconflict) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict treatiesinternalconflict treatiesexternalconflict) mtitles("\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}") eqlabel(none)

estimates clear

* Figure 3 left panel MID Hostility Level
quietly: xtreg log_pgm_count lagroll_internal_conflict_intens loglaggdppc_i i.lagdemoc##c.lagroll_avg_hostlev lagtreaties_signed i.year, fe vce(robust)

eststo m3: margins, dydx(lagdemoc) at(lagroll_avg_hostlev=0) at(lagroll_avg_hostlev=1) at(lagroll_avg_hostlev=2) at(lagroll_avg_hostlev=3) at(lagroll_avg_hostlev=4) at(lagroll_avg_hostlev=5) atmeans post vsquish

coefplot m3, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Democracy" " ", size(medsmall)) xtitle(" " "Average MID Hostility Level", size(medsmall)) xlabel(1 "MID Hostility Min" 2 " " 3 " " 4 " " 5 " " 6 "MID Hostility Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("External Threats")
graph save "T3ExternalConflictDemocAME.gph", replace
* graph export "T3ExternalConflictDemocAME.png", replace as(png)
graph export "T3ExternalConflictDemocAME.eps", replace as(eps)

* Figure 3 right panel Internal Conflict Level
quietly: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed i.lagdemoc##c.lagroll_internal_conflict_intens loglaggdppc_i i.year, fe vce(robust)

eststo m1: margins, dydx(lagdemoc) at(lagroll_internal_conflict_intens=0) at(lagroll_internal_conflict_intens=.2) at(lagroll_internal_conflict_intens=.4) at(lagroll_internal_conflict_intens=.6) at(lagroll_internal_conflict_intens=.8) at(lagroll_internal_conflict_intens=1) at(lagroll_internal_conflict_intens=1.2) at(lagroll_internal_conflict_intens=1.4) at(lagroll_internal_conflict_intens=1.6) at(lagroll_internal_conflict_intens=1.8) at(lagroll_internal_conflict_intens=2) atmeans post vsquish

coefplot m1, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Democracy" " ", size(medsmall)) xtitle(" " "UCDP Internal Conflict Intensity", size(medsmall)) xlabel(1 `" "UCDP Intensity"  "Min" "' 2 " " 3 " " 4 " " 5 " " 6 " " 7 " " 8 " " 9 " " 10 " " 11 `" "UCDP Intensity"  "Max" "', grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Internal Threats")
graph save "T3InternalConflictDemocAME.gph", replace
*graph export "T3InternalConflictDemocAME.png", replace as(png)
graph export "T3InternalConflictDemocAME.eps", replace as(eps)

estimates clear

* Figure 4 left panel MID Hostility Level

quietly: xtreg log_pgm_count lagroll_internal_conflict_intens loglaggdppc_i c.lagtreaties_signed##c.lagroll_avg_hostlev lagdemoc i.year , fe vce(robust)

eststo m3: margins, dydx(lagtreaties_signed) at(lagroll_avg_hostlev=0) at(lagroll_avg_hostlev=1) at(lagroll_avg_hostlev=2) at(lagroll_avg_hostlev=3) at(lagroll_avg_hostlev=4) at(lagroll_avg_hostlev=5) atmeans post vsquish

coefplot m3, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of ICRC Treaties" " ", size(medsmall)) xtitle(" " "Average MID Hostility Level", size(medsmall)) xlabel(1 "MID Hostility Min" 2 " " 3 " " 4 " " 5 " " 6 "MID Hostility Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("External Threats")
graph save "T4ExternalConflictTreatiesAME.gph", replace
*graph export "T4ExternalConflictTreatiesAME.png", replace as(png)
graph export "T4ExternalConflictTreatiesAME.eps", replace as(eps)

* Figure 4 right panel Internal Conflict Level

quietly: xtreg log_pgm_count lagroll_avg_hostlev loglaggdppc_i c.lagtreaties_signed##c.lagroll_internal_conflict_intens  lagdemoc i.year , fe vce(robust)

eststo m1: margins, dydx(lagtreaties_signed) at(lagroll_internal_conflict_intens=0) at(lagroll_internal_conflict_intens=.2) at(lagroll_internal_conflict_intens=.4) at(lagroll_internal_conflict_intens=.6) at(lagroll_internal_conflict_intens=.8) at(lagroll_internal_conflict_intens=1) at(lagroll_internal_conflict_intens=1.2) at(lagroll_internal_conflict_intens=1.4) at(lagroll_internal_conflict_intens=1.6) at(lagroll_internal_conflict_intens=1.8) at(lagroll_internal_conflict_intens=2) atmeans post vsquish

coefplot m1, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of ICRC Treaties" " ", size(medsmall)) xtitle(" " "UCDP Internal Conflict Intensity", size(medsmall)) xlabel(1 `" "UCDP Intensity"  "Min" "' 2 " " 3 " " 4 " " 5 " " 6 " " 7 " " 8 " " 9 " " 10 " " 11 `" "UCDP Intensity"  "Max" "', grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Internal Threats")
graph save "T4InternalConflictTreatiesAME.gph", replace
*graph export "T4InternalConflictTreatiesAME.png", replace as(png)
graph export "T4InternalConflictTreatiesAME.eps", replace as(eps)

estimates clear

* Figure 5: Three Way Interaction, Internal Conflict Level, Top Left
quietly: xtreg log_pgm_count c.lagroll_internal_conflict##c.lagtreaties_signed##i.lagdemoc, fe
eststo m1: margins, dydx(lagroll_internal_conflict_intens) at(lagtreaties_signed==0 lagdemoc==0) at(lagtreaties_signed==5 lagdemoc==0) at(lagtreaties_signed==10 lagdemoc==0) at(lagtreaties_signed==15 lagdemoc==0) at(lagtreaties_signed==20 lagdemoc==0) at(lagtreaties_signed==25 lagdemoc==0)  at(lagtreaties_signed==27 lagdemoc==0) atmeans post vsquish

quietly: xtreg log_pgm_count c.lagroll_internal_conflict##c.lagtreaties_signed##i.lagdemoc, fe
eststo m2: margins, dydx(lagroll_internal_conflict_intens) at(lagtreaties_signed==0 lagdemoc==1) at(lagtreaties_signed==5 lagdemoc==1) at(lagtreaties_signed==10 lagdemoc==1) at(lagtreaties_signed==15 lagdemoc==1) at(lagtreaties_signed==20 lagdemoc==1) at(lagtreaties_signed==25 lagdemoc==1) at(lagtreaties_signed==27 lagdemoc==1) atmeans post vsquish

coefplot (m1, lcolor("37 151 151") ciopts(recast(rline) lcolor("37 151 151") lpattern(dash))) (m2, lcolor("219 68 55") ciopts(recast(rline) lcolor("219 68 55") lpattern(dash))), recast(line) lwidth(*2) vertical legend(lab(2 "Non Democracy") lab(4 "Democracy") region(lwidth(none))) ytitle("AME of UCDP Internal Conflict Intensity" " " , size(medsmall)) xlabel(1 "0" 2 "5" 3 "10" 4 "15" 5 "20" 6 "25" 7 "27", grid labsize(medsmall)) xtitle(" " "ICRC Treaties") title("Internal Threats")

graph save "Graph" "ThreeWayInteractionInternal.gph", replace
* graph export "ThreeWayInteractionInternal.png", as(png) name("Graph") replace
graph export "ThreeWayInteractionInternal.eps", as(eps) name("Graph") replace

estimates clear

* Figure 5: Three Way Interaction, External Conflict Level, Bottom Right

quietly: xtreg log_pgm_count c.lagroll_avg_hostlev##c.lagtreaties_signed##i.lagdemoc, fe
eststo m1: margins, dydx(lagroll_avg_hostlev) at(lagtreaties_signed==0 lagdemoc==0) at(lagtreaties_signed==5 lagdemoc==0) at(lagtreaties_signed==10 lagdemoc==0) at(lagtreaties_signed==15 lagdemoc==0) at(lagtreaties_signed==20 lagdemoc==0) at(lagtreaties_signed==25 lagdemoc==0)  at(lagtreaties_signed==27 lagdemoc==0) atmeans post vsquish

quietly: xtreg log_pgm_count c.lagroll_avg_hostlev##c.lagtreaties_signed##i.lagdemoc, fe
eststo m2: margins, dydx(lagroll_avg_hostlev) at(lagtreaties_signed==0 lagdemoc==1) at(lagtreaties_signed==5 lagdemoc==1) at(lagtreaties_signed==10 lagdemoc==1) at(lagtreaties_signed==15 lagdemoc==1) at(lagtreaties_signed==20 lagdemoc==1) at(lagtreaties_signed==25 lagdemoc==1) at(lagtreaties_signed==27 lagdemoc==1) atmeans post vsquish

* coefplot m1, bylabel(Non Democracy) || m2, bylabel(Democracy) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Average MID Hostility Level", size(medsmall)) xlabel(1 "0" 2 "5" 3 "10" 4 "15" 5 "20" 6 "25" 7 "27", labsize(medsmall)) xtitle(" " "Lagged ICRC Treaties Signed") mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151"))

coefplot (m1, lcolor("37 151 151") ciopts(recast(rline) lcolor("37 151 151") lpattern(dash))) (m2, lcolor("219 68 55") ciopts(recast(rline) lcolor("219 68 55") lpattern(dash))), recast(line) lwidth(*2) vertical legend(lab(2 "Non Democracy") lab(4 "Democracy") region(lwidth(none))) ytitle("AME of Average MID Hostility Level" " " , size(medsmall)) xlabel(1 "0" 2 "5" 3 "10" 4 "15" 5 "20" 6 "25" 7 "27", grid labsize(medsmall)) xtitle(" " "ICRC Treaties") title("External Threats")

graph save "Graph" "ThreeWayInteractionExternal.gph", replace
* graph export "ThreeWayInteractionExternal.png", as(png) name("Graph") replace
graph export "ThreeWayInteractionExternal.eps", as(eps) name("Graph") replace

estimates clear

* Regressions that generate Figures 6 and 7, and Table A15

* GDP per capita
quietly eststo g2: regress log_pgm_count lagroll_internal_conflict_intens lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i t t2 t3, robust cluster(ccode)
* quietly eststo g2: logit pgm2 lagroll_internal_conflict_intens lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i, robust cluster(ccode)
eststo m2: margins, at( (means) _all loglaggdppc_i=(0(1)12)) post
* coefplot m2, at recast(line) lwidth(*2) ciopts(recast(rarea) fcolor("37 151 151%30") lcolor("37 151 151%0")) yline(0, lcolor("219 68 55") lpatt(shortdash)) ytitle("Linear Prediction of Smart Bomb Acquisition" " ", size(medsmall)) xtitle(" " "Lagged Logged GDP Per Capita", size(medsmall)) xlabel(0 "0" 2 "2" 4 "4" 6 "6" 8 "8" 10 "10" 12 "12", grid) lcolor("37 151 151") title("GDP Per Capita")
* graph export "TXGDPpercapita.png", replace as(png)

* IDI
quietly eststo g1: regress log_pgm_count lagroll_internal_conflict_intens lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i loglagidi_i, robust cluster(ccode)
* quietly eststo g1: logit pgm2 lagroll_internal_conflict_intens lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i loglagidi_i, robust cluster(ccode)
eststo m1: margins, at( (means) _all loglagidi_i=(-.637(.2)2.4)) post
* coefplot m1, at recast(line) lwidth(*2) ciopts(recast(rarea) fcolor("37 151 151%30") lcolor("37 151 151%0")) yline(0, lcolor("219 68 55") lpatt(shortdash)) ytitle("Linear Prediction of Smart Bomb Acquisition" " ", size(medsmall)) xtitle(" " "IDI", size(medsmall)) xlabel(-.5 "-.5" 1.5 "1.5" 2.5 "2.5", grid) lcolor("37 151 151") title("IDI")
* graph export "TXIDI.png", replace as(png)

* High Tech Exports
quietly eststo g3: regress log_pgm_count lagroll_internal_conflict_intens lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i log_HighTechExports_lag t t2 t3, robust cluster(ccode)
* quietly eststo g3: logit pgm2 lagroll_internal_conflict_intens lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i log_HighTechExports_lag t t2 t3, robust cluster(ccode)
eststo m3: margins, at( (means) _all log_HighTechExports_lag=(3.78419(2)28)) post
* coefplot m3, at recast(line) lwidth(*2) ciopts(recast(rarea) fcolor("37 151 151%30") lcolor("37 151 151%0")) yline(0, lcolor("219 68 55") lpatt(shortdash)) ytitle("Linear Prediction of Smart Bomb Acquisition" " ", size(medsmall)) xtitle(" " "Lagged Logged High Tech Exports", size(medsmall)) xlabel(3 "3" 6 "6" 9 "9" 12 "12" 15 "15" 18 "18" 21 "21" 24 "24" 27 "27", grid) lcolor("37 151 151") title("High Tech Exports")
* graph export "TXHighTechExports.png", replace as(png)

* Patents
quietly eststo g4: regress log_pgm_count lagroll_internal_conflict_intens lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i log_PatentApps_lag t t2 t3, robust cluster(ccode)
* quietly eststo g4: logit pgm2 lagroll_internal_conflict_intens lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i log_PatentApps_lag t t2 t3, robust cluster(ccode)
eststo m4: margins, at( (means) _all log_PatentApps_lag=(0(1)14)) post
* coefplot m4, at recast(line) lwidth(*2) ciopts(recast(rarea) fcolor("37 151 151%30") lcolor("37 151 151%0")) yline(0, lcolor("219 68 55") lpatt(shortdash)) ytitle("Linear Prediction of Smart Bomb Acquisition" " ", size(medsmall)) xtitle(" " "Lagged Logged Patents", size(medsmall)) xlabel(0 "0" 3 "3" 6 "6" 9 "9" 12 "12", grid) lcolor("37 151 151") title("Patents")
* graph export "TXPatents.png", replace as(png)

* Science and Technology Articles
quietly eststo g5: regress log_pgm_count lagroll_internal_conflict_intens lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i log_SciTechArticles_lag t t2 t3, robust cluster(ccode)
* quietly eststo g5: logit pgm2 lagroll_internal_conflict_intens lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i log_SciTechArticles_lag t t2 t3, robust cluster(ccode)
eststo m5: margins, at( (means) _all log_SciTechArticles_lag=(-1.609438(1)13)) post
* coefplot m5, at recast(line) lwidth(*2) ciopts(recast(rarea) fcolor("37 151 151%30") lcolor("37 151 151%0")) yline(0, lcolor("219 68 55") lpatt(shortdash)) ytitle("Linear Prediction of Smart Bomb Acquisition" " ", size(medsmall)) xtitle(" " "Lagged Logged Science & Technology Articles", size(medsmall)) xlabel(-2 "-2" -1 " " 0 "0" 1 " " 2 "2" 3 " " 4 "4" 5 " " 6 "6" 7 " " 8 "8" 9 " " 10 "10" 11 " " 12 "12" 13 " ", grid) lcolor("37 151 151") title("Science and Technology Articles")
* graph export "TXSciTech.png", replace as(png)

esttab g1 g2 g3 g4 g5 using TableA16.rtf, replace t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens lagtreaties_signed loglaggdppc_i loglagidi_i log_HighTechExports_lag log_PatentApps_lag log_SciTechArticles_lag) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens lagtreaties_signed loglaggdppc_i loglagidi_i log_HighTechExports_lag log_PatentApps_lag log_SciTechArticles_lag)

esttab g1 g2 g3 g4 g5 using TableA16.tex, replace f t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens lagtreaties_signed loglaggdppc_i loglagidi_i log_HighTechExports_lag log_PatentApps_lag log_SciTechArticles_lag) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens lagtreaties_signed loglaggdppc_i loglagidi_i log_HighTechExports_lag log_PatentApps_lag log_SciTechArticles_lag)  mtitles("\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}") eqlabel(none)




* Examples

* Countries with PGMs and high internal conflict
list statename ccode year pgm1 lagroll_internal_conflict lagpolity2 lagtreaties_signed if pgm1==1 & (lagroll_internal_conflict >=1 & lagroll_internal_conflict<=2)

* Countries with PGMs and high external conflict
list statename ccode year pgm1 lagroll_avg_hostlev lagpolity2 lagtreaties_signed if pgm1==1 & (lagroll_avg_hostlev>=2.5 & lagroll_avg_hostlev<=5)

* Democracies with PGMs, by treaties signed
list statename ccode year pgm1 lagroll_avg_hostlev lagroll_internal_conflict lagdemoc lagtreaties_signed if pgm1==1 & lagdemoc==1

* Appendix

estimates clear

* Figure A.1
quietly: xtreg log_pgm_count lagroll_avg_hostlev loglaggdppc_i i.lagdemoc##c.lagroll_internal_conflict_intens lagtreaties_signed i.year, fe vce(robust)

eststo m2: margins, dydx(lagroll_internal_conflict_intens) at(lagdemoc=0) at(lagdemoc=1) atmeans post vsquish

coefplot m2, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of UCDP Internal Conflict Intensity" " ", size(medsmall)) xtitle(" " "Regime Type", size(medsmall)) xlabel(1 "Non Democracy" 2 "Democracy", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Internal Threats")
graph save "T3InternalConflictAME.gph", replace
graph export "T3InternalConflictAME.png", replace as(png)

quietly: xtreg log_pgm_count lagroll_internal_conflict_intens loglaggdppc_i i.lagdemoc##c.lagroll_avg_hostlev lagtreaties_signed i.year, fe vce(robust)

eststo m4: margins, dydx(lagroll_avg_hostlev) at(lagdemoc=0) at(lagdemoc=1) atmeans post vsquish

coefplot m4, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Average MID Hostility Level" " ", size(medsmall)) xtitle(" " "Regime Type", size(medsmall)) xlabel(1 "Non Democracy" 2 "Democracy", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("External Threats")
graph save "T3ExternalConflictAME.gph", replace
graph export "T3ExternalConflictAME.png", replace as(png)

quietly: xtreg log_pgm_count lagroll_avg_hostlev loglaggdppc_i c.lagtreaties_signed##c.lagroll_internal_conflict_intens lagdemoc i.year , fe vce(robust)

eststo m2: margins, dydx(lagroll_internal_conflict_intens) at(lagtreaties_signed=0) at(lagtreaties_signed=2) at(lagtreaties_signed=4) at(lagtreaties_signed=6) at(lagtreaties_signed=8) at(lagtreaties_signed=10) at(lagtreaties_signed=12) at(lagtreaties_signed=14) at(lagtreaties_signed=16) at(lagtreaties_signed=18) at(lagtreaties_signed=20) at(lagtreaties_signed=22) at(lagtreaties_signed=24) at(lagtreaties_signed=26) at(lagtreaties_signed=27) atmeans post vsquish

coefplot m2, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of UCDP Internal Conflict Intensity" " ", size(medsmall)) xtitle(" " "ICRC Treaties", size(medsmall)) xlabel(1 "Treaties Min" 2 " " 3 " " 4 " " 5 " " 6 " " 7 " " 8 " " 9 " " 10 " " 11 " " 12 " " 13 " " 14 " " 15 "Treaties Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Internal Threats")
graph save "T4InternalConflictAME.gph", replace
graph export "T4InternalConflictAME.png", replace as(png)

quietly: xtreg log_pgm_count lagroll_internal_conflict_intens loglaggdppc_i c.lagtreaties_signed##c.lagroll_avg_hostlev lagdemoc i.year , fe vce(robust)

eststo m4: margins, dydx(lagroll_avg_hostlev) at(lagtreaties_signed=0) at(lagtreaties_signed=2) at(lagtreaties_signed=4) at(lagtreaties_signed=6) at(lagtreaties_signed=8) at(lagtreaties_signed=10) at(lagtreaties_signed=12) at(lagtreaties_signed=14) at(lagtreaties_signed=16) at(lagtreaties_signed=18) at(lagtreaties_signed=20) at(lagtreaties_signed=22) at(lagtreaties_signed=24) at(lagtreaties_signed=26) at(lagtreaties_signed=27) atmeans post vsquish

coefplot m4, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Average MID Hostility Level" " ", size(medsmall)) xtitle(" " "ICRC Treaties", size(medsmall)) xlabel(1 "Treaties Min" 2 " " 3 " " 4 " " 5 " " 6 " " 7 " " 8 " " 9 " " 10 " " 11 " " 12 " " 13 " " 14 " " 15 "Treaties Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("External Threats")
graph save "T4ExternalConflictAME.gph", replace
graph export "T4ExternalConflictAME.png", replace as(png)

estimates clear

* Figure A2
* Additional Table 3 models graphically illustrated in the appendix

estimates clear

* T3 M1: Logit: AME of Lagged Democracy - Internal

quietly: xtlogit pgm2 lagroll_avg_hostlev lagtreaties_signed i.lagdemoc##c.lagroll_internal_conflict_intens loglaggdppc_i, re vce(robust)

eststo m1: margins, dydx(lagdemoc) at(lagroll_internal_conflict_intens=0) at(lagroll_internal_conflict_intens=.2) at(lagroll_internal_conflict_intens=.4) at(lagroll_internal_conflict_intens=.6) at(lagroll_internal_conflict_intens=.8) at(lagroll_internal_conflict_intens=1) at(lagroll_internal_conflict_intens=1.2) at(lagroll_internal_conflict_intens=1.4) at(lagroll_internal_conflict_intens=1.6) at(lagroll_internal_conflict_intens=1.8) at(lagroll_internal_conflict_intens=2) atmeans post vsquish

coefplot m1, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Democracy" " ", size(medsmall)) xtitle(" " "UCDP Internal Conflict Intensity", size(medsmall)) xlabel(1 `""UCDP Intensity" "Min" "' 2 " " 3 " " 4 " " 5 " " 6 " " 7 " " 8 " " 9 " " 10 " " 11 `""UCDP Intensity" "Max""', grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Model 5, Table 3")

graph export "T3LogitInternalConflictDemocAME.png", replace as(png)

* T3 M3: Logit: AME of Lagged Democracy - External

quietly: xtlogit pgm2 lagroll_internal_conflict_intens lagtreaties_signed i.lagdemoc##c.lagroll_avg_hostlev loglaggdppc_i, re vce(robust)

eststo m2: margins, dydx(lagdemoc) at(lagroll_avg_hostlev=0) at(lagroll_avg_hostlev=1) at(lagroll_avg_hostlev=2) at(lagroll_avg_hostlev=3) at(lagroll_avg_hostlev=4) at(lagroll_avg_hostlev=5) atmeans post vsquish

coefplot m2, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Democracy" " ", size(medsmall)) xtitle(" " "Average MID Hostility Level", size(medsmall)) xlabel(1 "MID Hostility Min" 2 " " 3 " " 4 " " 5 " " 6 "MID Hostility Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Model 7, Table 3")

graph export "T3LogitExternalConflictDemocAME.png", replace as(png)

* T3 M5: Logit: AME of Lagged Treaties - Internal

* AME of Lagged Treaties
quietly: xtlogit pgm2 lagroll_avg_hostlev c.lagtreaties_signed##c.lagroll_internal_conflict_intens lagdemoc loglaggdppc_i, re vce(robust)

eststo m3: margins, dydx(lagtreaties_signed) at(lagroll_internal_conflict_intens=0) at(lagroll_internal_conflict_intens=.2) at(lagroll_internal_conflict_intens=.4) at(lagroll_internal_conflict_intens=.6) at(lagroll_internal_conflict_intens=.8) at(lagroll_internal_conflict_intens=1) at(lagroll_internal_conflict_intens=1.2) at(lagroll_internal_conflict_intens=1.4) at(lagroll_internal_conflict_intens=1.6) at(lagroll_internal_conflict_intens=1.8) at(lagroll_internal_conflict_intens=2) atmeans post vsquish

coefplot m3, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of ICRC Treaties" " ", size(medsmall)) xtitle(" " "UCDP Internal Conflict Intensity", size(medsmall)) xlabel(1 `""UCDP Intensity" "Min" "' 2 " " 3 " " 4 " " 5 " " 6 " " 7 " " 8 " " 9 " " 10 " " 11 `""UCDP Intensity" "Max""', grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Model 9, Table 3")

graph export "T3LogitInternalConflictTreatiesAME.png", replace as(png)

* T3 M7: Logit: AME of Lagged Treaties - External

quietly: xtlogit pgm2 lagroll_internal_conflict_intens c.lagtreaties_signed##c.lagroll_avg_hostlev lagdemoc loglaggdppc_i, re

eststo m4: margins, dydx(lagtreaties_signed) at(lagroll_avg_hostlev=0) at(lagroll_avg_hostlev=1) at(lagroll_avg_hostlev=2) at(lagroll_avg_hostlev=3) at(lagroll_avg_hostlev=4) at(lagroll_avg_hostlev=5) atmeans post vsquish

coefplot m4, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of ICRC Treaties" " ", size(medsmall)) xtitle(" " "Average MID Hostility Level", size(medsmall)) xlabel(1 "MID Hostility Min" 2 " " 3 " " 4 " " 5 " " 6 "MID Hostility Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Model 11, Table 3")

graph export "T3LogitExternalConflictTreatiesAME.png", replace as(png)

estimates clear

*Figure A3

estimates clear
gen monthbegin=1
gen daybegin=1
gen t0 = mdy(monthbegin, daybegin, year)
format t0 %d
gen monthend=12
gen dayend=31
gen t1 = mdy(monthend, dayend, year)
format t1 %d
stset year, id(ccode) failure(pgm2==1)

* Survival Curve for External Threats
stcox lagroll_avg_hostlev lagroll_internal_conflict loglaggdppc_i lagdemoc lagtreaties_signed, cluster(ccode) robust nohr

stcurve, survival at(lagroll_avg_hostlev=0) at(lagroll_avg_hostlev=1) at(lagroll_avg_hostlev=2) at(lagroll_avg_hostlev=3) at(lagroll_avg_hostlev=4) at(lagroll_avg_hostlev=5) ytitle("Probability of Survival" "(Smart Bomb Acquisition = Failure)" " ") xtitle(" " "Year") legend(label(1 "Avg MID Level=0") label(2 "Avg MID Level=1") label(3 "Avg MID Level=2") label(4 "Avg MID Level=3") label(5 "Avg MID Level=4") label(6 "Avg MID Level=5") region(lstyle(none))) title(" ") xlabel(, grid) title("Probability of Survival Based on External Threats")

graph save "Graph" "SurvivalExternalAF1.gph", replace

graph export SurvivalExternalAF1.png, as(png) name("Graph") replace

* Survival Curve for Internal Threats
stcox lagroll_avg_hostlev lagroll_internal_conflict loglaggdppc_i lagdemoc lagtreaties_signed, cluster(ccode) robust nohr

stcurve, survival at(lagroll_internal_conflict_intens=0) at(lagroll_internal_conflict_intens=.5) at(lagroll_internal_conflict_intens=1) at(lagroll_internal_conflict_intens=1.5) at(lagroll_internal_conflict_intens=2) ytitle("Probability of Survival" "(Smart Bomb Acquisition = Failure)" " ") xtitle(" " "Year") legend(label(1 "Lagged UCDP Intensity=0") label(2 "Lagged UCDP Intensity=.5") label(3 "Lagged UCDP Intensity=1") label(4 "Lagged UCDP Intensity=1.5") label(5 "Lagged UCDP Intensity=2") region(lstyle(none))) title("Probability of Survival Based on Internal Threats") xlabel(, grid)

graph save "Graph" "SurvivalInternalAF2.gph", replace

graph export SurvivalInternalAF2.png, as(png) name("Graph") replace

* Table A.1 (see R replication files)

* Table A.2 (null)

* Table A.3: Table 2 with other IVs + IDI
eststo m1: logit pgm2 lagroll_internal_conflict_intens lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i lagcinc_5 lagmembership loglagidi_i, robust cluster(ccode)
eststo m2: logit pgm2 lagroll_internal_conflict_intens lagtotal_borders lagtreaties_signed lagpolity2 loglaggdppc_i lagcinc_5 lagmembership loglagidi_i, robust cluster(ccode)
eststo m3: regress log_pgm_count lagroll_internal_conflict_intens lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i lagcinc_5 lagmembership loglagidi_i, robust cluster(ccode)
eststo m4: regress log_pgm_count lagroll_internal_conflict_intens lagtotal_borders lagtreaties_signed lagpolity2 loglaggdppc_i lagcinc_5 lagmembership loglagidi_i, robust cluster(ccode)

esttab m1 m2 m3 m4 using TableA3.rtf, replace t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared") legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_internal_conflict_intens lagroll_avg_hostlev lagtotal_borders loglaggdppc_i lagtreaties_signed lagpolity2 lagcinc_5 lagmembership loglagidi_i)

esttab m1 m2 m3 m4 using TableA3.tex, replace f t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared") legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_internal_conflict_intens lagroll_avg_hostlev lagtotal_borders loglaggdppc_i lagtreaties_signed lagpolity2 lagcinc_5 lagmembership loglagidi_i) mtitles("\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}") eqlabel(none)

estimates clear

* Table A4: Table 3 year FEs
xtset year
eststo m1: xtlogit pgm2 lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens democinternalconflict loglaggdppc_i, re
eststo m2: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens democinternalconflict loglaggdppc_i, fe
eststo m3: xtlogit pgm2 lagroll_internal_conflict_intens lagtreaties_signed lagdemoc lagroll_avg_hostlev democexternalconflict loglaggdppc_i, re
eststo m4: xtreg log_pgm_count lagroll_internal_conflict lagtreaties_signed lagdemoc lagroll_avg_hostlev democexternalconflict loglaggdppc_i, fe

esttab m1 m2 m3 m4 using TableA4.rtf, replace t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict lagcinc_5 lagmembership loglagidi_i) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict lagcinc_5 lagmembership loglagidi_i)

esttab m1 m2 m3 m4 using TableA4.tex, replace f t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict lagcinc_5 lagmembership loglagidi_i) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict) mtitles("\shortstack{Smart Bombs\\Binary\\Random Effects\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\Fixed Effects\\b/SE}" "\shortstack{Smart Bombs\\Binary\\Random Effects\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\Fixed Effects\\b/SE}") eqlabel(none)

* Figure A4
xtset year

* Democracy * Internal conflict
quietly: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed i.lagdemoc##c.lagroll_internal_conflict_intens loglaggdppc_i, fe vce(robust)

eststo m1: margins, dydx(lagdemoc) at(lagroll_internal_conflict_intens=0) at(lagroll_internal_conflict_intens=.2) at(lagroll_internal_conflict_intens=.4) at(lagroll_internal_conflict_intens=.6) at(lagroll_internal_conflict_intens=.8) at(lagroll_internal_conflict_intens=1) at(lagroll_internal_conflict_intens=1.2) at(lagroll_internal_conflict_intens=1.4) at(lagroll_internal_conflict_intens=1.6) at(lagroll_internal_conflict_intens=1.8) at(lagroll_internal_conflict_intens=2) atmeans post vsquish

coefplot m1, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Democracy" " ", size(medsmall)) xtitle(" " "UCDP Internal Conflict Intensity", size(medsmall)) xlabel(1 `" "UCDP Intensity"  "Min" "' 2 " " 3 " " 4 " " 5 " " 6 " " 7 " " 8 " " 9 " " 10 " " 11 `" "UCDP Intensity"  "Max" "', grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Internal Threats")
*graph save "YearFEInternalConflictDemocAME.gph", replace
graph export "YearFEInternalConflictDemocAME.png", replace as(png)

* Democracy * External conflict
quietly: xtreg log_pgm_count lagroll_internal_conflict_intens loglaggdppc_i i.lagdemoc##c.lagroll_avg_hostlev lagtreaties_signed, fe vce(robust)

eststo m3: margins, dydx(lagdemoc) at(lagroll_avg_hostlev=0) at(lagroll_avg_hostlev=1) at(lagroll_avg_hostlev=2) at(lagroll_avg_hostlev=3) at(lagroll_avg_hostlev=4) at(lagroll_avg_hostlev=5) atmeans post vsquish

coefplot m3, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Democracy" " ", size(medsmall)) xtitle(" " "Average MID Hostility Level", size(medsmall)) xlabel(1 "MID Hostility Min" 2 " " 3 " " 4 " " 5 " " 6 "MID Hostility Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("External Threats")
*graph save "YearFEExternalConflictDemocAME.gph", replace
graph export "YearFEExternalConflictDemocAME.png", replace as(png)

* Lagged Treaties * Internal Conflict
quietly: xtreg log_pgm_count lagroll_avg_hostlev loglaggdppc_i c.lagtreaties_signed##c.lagroll_internal_conflict_intens  lagdemoc, fe vce(robust)

eststo m1: margins, dydx(lagtreaties_signed) at(lagroll_internal_conflict_intens=0) at(lagroll_internal_conflict_intens=.2) at(lagroll_internal_conflict_intens=.4) at(lagroll_internal_conflict_intens=.6) at(lagroll_internal_conflict_intens=.8) at(lagroll_internal_conflict_intens=1) at(lagroll_internal_conflict_intens=1.2) at(lagroll_internal_conflict_intens=1.4) at(lagroll_internal_conflict_intens=1.6) at(lagroll_internal_conflict_intens=1.8) at(lagroll_internal_conflict_intens=2) atmeans post vsquish

coefplot m1, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of ICRC Treaties" " ", size(medsmall)) xtitle(" " "UCDP Internal Conflict Intensity", size(medsmall)) xlabel(1 `" "UCDP Intensity"  "Min" "' 2 " " 3 " " 4 " " 5 " " 6 " " 7 " " 8 " " 9 " " 10 " " 11 `" "UCDP Intensity"  "Max" "', grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Internal Threats")
*graph save "YearFEInternalConflictTreatiesAME.gph", replace
graph export "YearFEInternalConflictTreatiesAME.png", replace as(png)

* Lagged Treaties * External Conflict

quietly: xtreg log_pgm_count lagroll_internal_conflict_intens loglaggdppc_i c.lagtreaties_signed##c.lagroll_avg_hostlev lagdemoc, fe vce(robust)

eststo m3: margins, dydx(lagtreaties_signed) at(lagroll_avg_hostlev=0) at(lagroll_avg_hostlev=1) at(lagroll_avg_hostlev=2) at(lagroll_avg_hostlev=3) at(lagroll_avg_hostlev=4) at(lagroll_avg_hostlev=5) atmeans post vsquish

coefplot m3, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of ICRC Treaties" " ", size(medsmall)) xtitle(" " "Average MID Hostility Level", size(medsmall)) xlabel(1 "MID Hostility Min" 2 " " 3 " " 4 " " 5 " " 6 "MID Hostility Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("External Threats")
*graph save "YearFEExternalConflictTreatiesAME.gph", replace
graph export "YearFEExternalConflictTreatiesAME.png", replace as(png)

estimates clear

* Table A5: Table 3 no year FEs
xtset ccode year, yearly
eststo m1: xtlogit pgm2 lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens democinternalconflict loglaggdppc_i, re
eststo m2: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens democinternalconflict loglaggdppc_i, fe
eststo m3: xtlogit pgm2 lagroll_internal_conflict_intens lagtreaties_signed lagdemoc lagroll_avg_hostlev democexternalconflict loglaggdppc_i , re
eststo m4: xtreg log_pgm_count lagroll_internal_conflict lagtreaties_signed lagdemoc lagroll_avg_hostlev democexternalconflict loglaggdppc_i , fe

esttab m1 m2 m3 m4 using TableA5.rtf, replace t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict ) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict )

esttab m1 m2 m3 m4 using TableA5.tex, replace f t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict ) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict ) mtitles("\shortstack{Smart Bombs\\Binary\\Random Effects\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\Fixed Effects\\b/SE}" "\shortstack{Smart Bombs\\Binary\\Random Effects\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\Fixed Effects\\b/SE}") eqlabel(none)

estimates clear

* Table A6: Table 4 no year FEs
xtset ccode year, yearly
eststo m1: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens treatiesinternalconflict loglaggdppc_i , fe
eststo m2: xtlogit pgm2 lagroll_internal_conflict lagtreaties_signed lagdemoc lagroll_avg_hostlev treatiesexternalconflict loglaggdppc_i , fe
xtset year
eststo m3: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens treatiesinternalconflict loglaggdppc_i , fe
eststo m4: xtlogit pgm2 lagroll_internal_conflict lagtreaties_signed lagdemoc lagroll_avg_hostlev treatiesexternalconflict loglaggdppc_i , fe

esttab m1 m2 m3 m4 using TableA6.rtf, replace t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc treatiesinternalconflict treatiesexternalconflict ) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc treatiesinternalconflict treatiesexternalconflict )

esttab m1 m2 m3 m4 using TableA6.tex, replace f t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc treatiesinternalconflict treatiesexternalconflict ) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc treatiesinternalconflict treatiesexternalconflict ) mtitles("\shortstack{Logged Count of\\Smart Bombs\\Fixed Effects\\b/SE}" "\shortstack{Smart Bombs\\Binary\\Random Effects\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\Fixed Effects\\b/SE}" "\shortstack{Smart Bombs\\Binary\\Random Effects\\b/SE}") eqlabel(none)

* Figure A5 No Year FE

estimates clear
xtset ccode year, yearly

* Democracy * Internal conflict
quietly: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed i.lagdemoc##c.lagroll_internal_conflict_intens loglaggdppc_i, fe vce(robust)

eststo m1: margins, dydx(lagdemoc) at(lagroll_internal_conflict_intens=0) at(lagroll_internal_conflict_intens=.2) at(lagroll_internal_conflict_intens=.4) at(lagroll_internal_conflict_intens=.6) at(lagroll_internal_conflict_intens=.8) at(lagroll_internal_conflict_intens=1) at(lagroll_internal_conflict_intens=1.2) at(lagroll_internal_conflict_intens=1.4) at(lagroll_internal_conflict_intens=1.6) at(lagroll_internal_conflict_intens=1.8) at(lagroll_internal_conflict_intens=2) atmeans post vsquish

coefplot m1, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Democracy" " ", size(medsmall)) xtitle(" " "UCDP Internal Conflict Intensity", size(medsmall)) xlabel(1 `" "UCDP Intensity"  "Min" "' 2 " " 3 " " 4 " " 5 " " 6 " " 7 " " 8 " " 9 " " 10 " " 11 `" "UCDP Intensity"  "Max" "', grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Internal Threats")
*graph save "CountryFEInternalConflictDemocAME.gph", replace
graph export "CountryFEInternalConflictDemocAME.png", replace as(png)

* Democracy * External conflict
quietly: xtreg log_pgm_count lagroll_internal_conflict_intens loglaggdppc_i i.lagdemoc##c.lagroll_avg_hostlev lagtreaties_signed, fe vce(robust)

eststo m3: margins, dydx(lagdemoc) at(lagroll_avg_hostlev=0) at(lagroll_avg_hostlev=1) at(lagroll_avg_hostlev=2) at(lagroll_avg_hostlev=3) at(lagroll_avg_hostlev=4) at(lagroll_avg_hostlev=5) atmeans post vsquish

coefplot m3, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Democracy" " ", size(medsmall)) xtitle(" " "Average MID Hostility Level", size(medsmall)) xlabel(1 "MID Hostility Min" 2 " " 3 " " 4 " " 5 " " 6 "MID Hostility Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("External Threats")
*graph save "YearFEExternalConflictDemocAME.gph", replace
graph export "CountryFEExternalConflictDemocAME.png", replace as(png)

* Lagged Treaties * Internal Conflict
quietly: xtreg log_pgm_count lagroll_avg_hostlev loglaggdppc_i c.lagtreaties_signed##c.lagroll_internal_conflict_intens  lagdemoc, fe vce(robust)

eststo m1: margins, dydx(lagtreaties_signed) at(lagroll_internal_conflict_intens=0) at(lagroll_internal_conflict_intens=.2) at(lagroll_internal_conflict_intens=.4) at(lagroll_internal_conflict_intens=.6) at(lagroll_internal_conflict_intens=.8) at(lagroll_internal_conflict_intens=1) at(lagroll_internal_conflict_intens=1.2) at(lagroll_internal_conflict_intens=1.4) at(lagroll_internal_conflict_intens=1.6) at(lagroll_internal_conflict_intens=1.8) at(lagroll_internal_conflict_intens=2) atmeans post vsquish

coefplot m1, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of ICRC Treaties" " ", size(medsmall)) xtitle(" " "UCDP Internal Conflict Intensity", size(medsmall)) xlabel(1 `" "UCDP Intensity"  "Min" "' 2 " " 3 " " 4 " " 5 " " 6 " " 7 " " 8 " " 9 " " 10 " " 11 `" "UCDP Intensity"  "Max" "', grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Internal Threats")
*graph save "YearFEInternalConflictTreatiesAME.gph", replace
graph export "CountryFEInternalConflictTreatiesAME.png", replace as(png)

* Lagged Treaties * External Conflict

quietly: xtreg log_pgm_count lagroll_internal_conflict_intens loglaggdppc_i c.lagtreaties_signed##c.lagroll_avg_hostlev lagdemoc, fe vce(robust)

eststo m3: margins, dydx(lagtreaties_signed) at(lagroll_avg_hostlev=0) at(lagroll_avg_hostlev=1) at(lagroll_avg_hostlev=2) at(lagroll_avg_hostlev=3) at(lagroll_avg_hostlev=4) at(lagroll_avg_hostlev=5) atmeans post vsquish

coefplot m3, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of ICRC Treaties" " ", size(medsmall)) xtitle(" " "Average MID Hostility Level", size(medsmall)) xlabel(1 "MID Hostility Min" 2 " " 3 " " 4 " " 5 " " 6 "MID Hostility Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("External Threats")
*graph save "YearFEExternalConflictTreatiesAME.gph", replace
graph export "CountryFEExternalConflictTreatiesAME.png", replace as(png)

estimates clear

* Table A7 Survival
* estimates clear
* gen monthbegin=1
* gen daybegin=1
* gen t0 = mdy(monthbegin, daybegin, year)
* format t0 %d
* gen monthend=12
* gen dayend=31
* gen t1 = mdy(monthend, dayend, year)
* format t1 %d
stset year, id(ccode) failure(pgm2==1)
eststo m1: stcox lagroll_avg_hostlev lagroll_internal_conflict loglaggdppc_i lagdemoc lagtreaties_signed, cluster(ccode) robust nohr
eststo m2: stcox lagtotal_borders lagroll_internal_conflict loglaggdppc_i lagdemoc lagtreaties_signed, cluster(ccode) robust nohr
* eststo: stcox lagroll_internal_conflict loglaggdppc_i c.lagtotal_borders##c.lagpolity2 lagtreaties_signed, cluster(ccode) robust nohr
* eststo: stcox lagtotal_borders loglaggdppc_i c.lagroll_internal_conflict##c.lagpolity2 lagtreaties_signed, cluster(ccode) robust nohr
* eststo: stcox lagroll_internal_conflict loglaggdppc_i c.lagtotal_borders##c.lagtreaties_signed lagpolity2, cluster(ccode) robust nohr
* eststo: stcox lagtotal_borders loglaggdppc_i c.lagroll_internal_conflict##c.lagtreaties_signed lagpolity2, cluster(ccode) robust nohr

esttab m1 m2 using TableA7.rtf, replace t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared") legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagtotal_borders lagroll_internal_conflict_intens loglaggdppc_i lagdemoc lagtreaties_signed) mtitle("Model 1: Lagged MID Hostility Level" "Model 2: Lagged Total Borders")

esttab m1 m2 using TableA7.tex, replace f t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared") legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagtotal_borders lagroll_internal_conflict_intens loglaggdppc_i lagdemoc lagtreaties_signed) mtitles("\shortstack{Smart Bombs\\Binary\\Cox Model\\b/SE}" "\shortstack{Smart Bombs\\Binary\\Cox Model\\b/SE}") eqlabel(none)

estimates clear

* Table A8: Negative binomial models
eststo m1: nbreg pgm_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens loglaggdppc_i i.year, robust cluster(ccode)
xtset year
eststo m2: xtnbreg pgm_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens loglaggdppc_i, fe
xtset ccode year, yearly
eststo m3: xtnbreg pgm_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens loglaggdppc_i , fe

esttab m1 m2 m3 using TableA8.rtf, replace t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared") legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc ) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc )

esttab m1 m2 m3 using TableA8.tex, replace f t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared") legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc) mtitles("\shortstack{Negative Binomial\\Year\\Fixed Effects\\b/SE}" "\shortstack{Negative Binomial\\Country\\Fixed Effects\\b/SE}" "\shortstack{Negative Binomial\\Country\\Random Effects\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\Fixed Effects\\b/SE}") eqlabel(none)

estimates clear

* Table A9: Alternative Internal Conflict Measures
eststo m1: logit pgm2 lagroll_total_internal_conflicts lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i , robust cluster(ccode)
eststo m2: logit pgm2 lagroll_total_internal_conflicts lagtotal_borders lagtreaties_signed lagpolity2 loglaggdppc_i , robust cluster(ccode)
eststo m3: regress log_pgm_count lagroll_total_internal_conflicts lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i , robust cluster(ccode)
eststo m4: regress log_pgm_count lagroll_total_internal_conflicts lagtotal_borders lagtreaties_signed lagpolity2 loglaggdppc_i , robust cluster(ccode)

esttab m1 m2 m3 m4 using TableA9.rtf, replace t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared") legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_internal_conflict_intens lagroll_avg_hostlev lagtotal_borders loglaggdppc_i lagtreaties_signed lagpolity2 )

esttab m1 m2 m3 m4 using TableA9.tex, replace f t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared") legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_total_internal_conflicts lagroll_avg_hostlev lagtotal_borders loglaggdppc_i lagtreaties_signed lagpolity2 ) mtitles("\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}") eqlabel(none)

estimates clear

* Table A10: Democratic Interaction Post-1980

eststo m1: xtlogit pgm2 lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens democinternalconflict loglaggdppc_i loglagidi_i, re
eststo m2: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens democinternalconflict loglaggdppc_i loglagidi_i i.year if year>1980, fe
eststo m3: xtlogit pgm2 lagroll_internal_conflict_intens lagtreaties_signed lagdemoc lagroll_avg_hostlev democexternalconflict loglaggdppc_i loglagidi_i if year>1980, re
eststo m4: xtreg log_pgm_count lagroll_internal_conflict lagtreaties_signed lagdemoc lagroll_avg_hostlev democexternalconflict loglaggdppc_i loglagidi_i i.year if year>1980, fe

esttab m1 m2 m3 m4 using TableA10.rtf, replace t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict ) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i loglagidi_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict)

esttab m1 m2 m3 m4 using TableA10.tex, replace f t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict ) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i loglagidi_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict) mtitles("\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}") eqlabel(none)

estimates clear

* Treaties Interaction after 1980

eststo m1: xtlogit pgm2 lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens treatiesinternalconflict loglaggdppc_i loglagidi_i if year>1980, re
eststo m2: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens treatiesinternalconflict loglaggdppc_i loglagidi_i i.year if year>1980, fe
eststo m3: xtlogit pgm2 lagroll_internal_conflict_intens lagtreaties_signed lagdemoc lagroll_avg_hostlev treatiesexternalconflict loglaggdppc_i loglagidi_i if year>1980, re
eststo m4: xtreg log_pgm_count lagroll_internal_conflict lagtreaties_signed lagdemoc lagroll_avg_hostlev treatiesexternalconflict loglaggdppc_i loglagidi_i i.year if year>1980, fe

esttab m1 m2 m3 m4 using TableA11.rtf, replace t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc treatiesinternalconflict treatiesexternalconflict) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i loglagidi_i lagtreaties_signed lagdemoc treatiesinternalconflict treatiesexternalconflict)

esttab m1 m2 m3 m4 using TableA11.tex, replace f t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc treatiesinternalconflict treatiesexternalconflict) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i loglagidi_i lagtreaties_signed lagdemoc treatiesinternalconflict treatiesexternalconflict) mtitles("\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}") eqlabel(none)

estimates clear

* Figure A6

* Post 1980
estimates clear
xtset ccode year

* Democracy * Internal conflict
quietly: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed i.lagdemoc##c.lagroll_internal_conflict_intens loglaggdppc_i i.year if year>1980, fe vce(robust)

eststo m1: margins, dydx(lagdemoc) at(lagroll_internal_conflict_intens=0) at(lagroll_internal_conflict_intens=.2) at(lagroll_internal_conflict_intens=.4) at(lagroll_internal_conflict_intens=.6) at(lagroll_internal_conflict_intens=.8) at(lagroll_internal_conflict_intens=1) at(lagroll_internal_conflict_intens=1.2) at(lagroll_internal_conflict_intens=1.4) at(lagroll_internal_conflict_intens=1.6) at(lagroll_internal_conflict_intens=1.8) at(lagroll_internal_conflict_intens=2) atmeans post vsquish

coefplot m1, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Democracy" " ", size(medsmall)) xtitle(" " "UCDP Internal Conflict Intensity", size(medsmall)) xlabel(1 "UCDP Intensity Min" 2 " " 3 " " 4 " " 5 " " 6 " " 7 " " 8 " " 9 " " 10 " " 11 "UCDP Intensity Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Internal Threats")
*graph save "Post1980FEExternalConflictDemocAME.gph", replace
graph export "Post1980FEInternalConflictDemocAME.png", replace as(png)

* Democracy * External conflict
quietly: xtreg log_pgm_count lagroll_internal_conflict_intens loglaggdppc_i i.lagdemoc##c.lagroll_avg_hostlev lagtreaties_signed i.year if year>1980, fe vce(robust)

eststo m3: margins, dydx(lagdemoc) at(lagroll_avg_hostlev=0) at(lagroll_avg_hostlev=1) at(lagroll_avg_hostlev=2) at(lagroll_avg_hostlev=3) at(lagroll_avg_hostlev=4) at(lagroll_avg_hostlev=5) atmeans post vsquish

coefplot m3, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Democracy" " ", size(medsmall)) xtitle(" " "Average MID Hostility Level", size(medsmall)) xlabel(1 "MID Hostility Min" 2 " " 3 " " 4 " " 5 " " 6 "MID Hostility Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("External Threats")
*graph save "Post1980FEExternalConflictDemocAME.gph", replace
graph export "Post1980FEExternalConflictDemocAME.png", replace as(png)

* Lagged Treaties * Internal Conflict
quietly: xtreg log_pgm_count lagroll_avg_hostlev loglaggdppc_i c.lagtreaties_signed##c.lagroll_internal_conflict_intens  lagdemoc i.year if year>1980, fe vce(robust)

eststo m1: margins, dydx(lagtreaties_signed) at(lagroll_internal_conflict_intens=0) at(lagroll_internal_conflict_intens=.2) at(lagroll_internal_conflict_intens=.4) at(lagroll_internal_conflict_intens=.6) at(lagroll_internal_conflict_intens=.8) at(lagroll_internal_conflict_intens=1) at(lagroll_internal_conflict_intens=1.2) at(lagroll_internal_conflict_intens=1.4) at(lagroll_internal_conflict_intens=1.6) at(lagroll_internal_conflict_intens=1.8) at(lagroll_internal_conflict_intens=2) atmeans post vsquish

coefplot m1, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of ICRC Treaties" " ", size(medsmall)) xtitle(" " "UCDP Internal Conflict Intensity", size(medsmall)) xlabel(1 "UCDP Intensity Min" 2 " " 3 " " 4 " " 5 " " 6 " " 7 " " 8 " " 9 " " 10 " " 11 "UCDP Intensity Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Internal Threats")
*graph save "Post1980FEInternalConflictTreatiesAME.gph", replace
graph export "Post1980FEInternalConflictTreatiesAME.png", replace as(png)

* Lagged Treaties * External Conflict

quietly: xtreg log_pgm_count lagroll_internal_conflict_intens loglaggdppc_i c.lagtreaties_signed##c.lagroll_avg_hostlev lagdemoc i.year if year>1980, fe vce(robust)

eststo m3: margins, dydx(lagtreaties_signed) at(lagroll_avg_hostlev=0) at(lagroll_avg_hostlev=1) at(lagroll_avg_hostlev=2) at(lagroll_avg_hostlev=3) at(lagroll_avg_hostlev=4) at(lagroll_avg_hostlev=5) atmeans post vsquish

coefplot m3, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of ICRC Treaties" " ", size(medsmall)) xtitle(" " "Average MID Hostility Level", size(medsmall)) xlabel(1 "MID Hostility Min" 2 " " 3 " " 4 " " 5 " " 6 "MID Hostility Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("External Threats")
*graph save "YPost1980FEExternalConflictTreatiesAME.gph", replace
graph export "Post1980FEExternalConflictTreatiesAME.png", replace as(png)

estimates clear

* Table A12 Three Way Interaction
eststo m1: xtreg log_pgm_count c.lagroll_internal_conflict##c.lagtreaties_signed##i.lagdemoc , fe
eststo m2: xtreg log_pgm_count c.lagroll_avg_hostlev##c.lagtreaties_signed##i.lagdemoc , fe
esttab m1 m2 using TableA14.rtf, replace f t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels

esttab m1 m2 using TableA12.tex, replace f t(3) scalars(ll) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels mtitles("\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}") eqlabel(none)


* Table A13 VDem
estimates clear

eststo m1: xtlogit pgm2 lagroll_avg_hostlev lagtreaties_signed lagroll_internal_conflict_intens vdem vdeminternalconflict loglaggdppc_i, re
eststo m2: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed lagroll_internal_conflict_intens vdem vdeminternalconflict loglaggdppc_i i.year, fe
eststo m3: xtlogit pgm2 lagroll_internal_conflict_intens lagtreaties_signed vdem lagroll_avg_hostlev vdeminternalconflict loglaggdppc_i, re
eststo m4: xtreg log_pgm_count lagroll_internal_conflict lagtreaties_signed vdem lagroll_avg_hostlev vdemexternalconflict loglaggdppc_i i.year, fe
eststo m5: xtlogit pgm2 lagroll_avg_hostlev lagtreaties_signed vdem lagroll_internal_conflict_intens treatiesinternalconflict loglaggdppc_i, re
eststo m6: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed vdem lagroll_internal_conflict_intens treatiesinternalconflict loglaggdppc_i i.year, fe
eststo m7: xtlogit pgm2 lagroll_internal_conflict_intens lagtreaties_signed vdem lagroll_avg_hostlev treatiesexternalconflict loglaggdppc_i, re
eststo m8: xtreg log_pgm_count lagroll_internal_conflict lagtreaties_signed vdem lagroll_avg_hostlev treatiesexternalconflict loglaggdppc_i i.year, fe

esttab m1 m2 m3 m4 m5 m6 m7 m8 using TableA13.rtf, replace t(3) scalars(ll F chi2 r2b r2_o r2_w r2) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed vdem vdeminternalconflict vdemexternalconflict treatiesinternalconflict treatiesexternalconflict) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed vdem vdeminternalconflict vdemexternalconflict treatiesinternalconflict treatiesexternalconflict)

esttab m1 m2 m3 m4 m5 m6 m7 m8 using TableA13.tex, replace f t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed vdem vdeminternalconflict vdemexternalconflict treatiesinternalconflict treatiesexternalconflict) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed vdem vdeminternalconflict vdemexternalconflict treatiesinternalconflict treatiesexternalconflict) mtitles("\shortstack{Smart Bombs\\Binary}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Smart Bombs\\Binary}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}") eqlabel(none)

* Figure A7 VDem

* Vdem
estimates clear
xtset ccode year

* Democracy * Internal conflict
quietly: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed c.vdem##c.lagroll_internal_conflict_intens loglaggdppc_i i.year, fe vce(robust)

eststo m1: margins, dydx(vdem) at(lagroll_internal_conflict_intens=0) at(lagroll_internal_conflict_intens=.2) at(lagroll_internal_conflict_intens=.4) at(lagroll_internal_conflict_intens=.6) at(lagroll_internal_conflict_intens=.8) at(lagroll_internal_conflict_intens=1) at(lagroll_internal_conflict_intens=1.2) at(lagroll_internal_conflict_intens=1.4) at(lagroll_internal_conflict_intens=1.6) at(lagroll_internal_conflict_intens=1.8) at(lagroll_internal_conflict_intens=2) atmeans post vsquish

coefplot m1, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Democracy" " ", size(medsmall)) xtitle(" " "UCDP Internal Conflict Intensity", size(medsmall)) xlabel(1 `" "UCDP Intensity"  "Min" "' 2 " " 3 " " 4 " " 5 " " 6 " " 7 " " 8 " " 9 " " 10 " " 11 `" "UCDP Intensity"  "Max" "', grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Internal Threats")
*graph save "vdemFEInternalConflictDemocAME.gph", replace
graph export "vdemFEInternalConflictDemocAME.png", replace as(png)

* Democracy * External conflict
quietly: xtreg log_pgm_count lagroll_internal_conflict_intens loglaggdppc_i c.vdem##c.lagroll_avg_hostlev lagtreaties_signed i.year, fe vce(robust)

eststo m3: margins, dydx(vdem) at(lagroll_avg_hostlev=0) at(lagroll_avg_hostlev=1) at(lagroll_avg_hostlev=2) at(lagroll_avg_hostlev=3) at(lagroll_avg_hostlev=4) at(lagroll_avg_hostlev=5) atmeans post vsquish

coefplot m3, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Democracy" " ", size(medsmall)) xtitle(" " "Average MID Hostility Level", size(medsmall)) xlabel(1 "MID Hostility Min" 2 " " 3 " " 4 " " 5 " " 6 "MID Hostility Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("External Threats")
*graph save "vdemFEInternalConflictDemocAME.gph", replace
graph export "vdemFEInternalConflictDemocAME.png", replace as(png)

* Lagged Treaties * Internal Conflict
quietly: xtreg log_pgm_count lagroll_avg_hostlev loglaggdppc_i c.lagtreaties_signed##c.lagroll_internal_conflict_intens vdem i.year, fe vce(robust)

eststo m1: margins, dydx(lagtreaties_signed) at(lagroll_internal_conflict_intens=0) at(lagroll_internal_conflict_intens=.2) at(lagroll_internal_conflict_intens=.4) at(lagroll_internal_conflict_intens=.6) at(lagroll_internal_conflict_intens=.8) at(lagroll_internal_conflict_intens=1) at(lagroll_internal_conflict_intens=1.2) at(lagroll_internal_conflict_intens=1.4) at(lagroll_internal_conflict_intens=1.6) at(lagroll_internal_conflict_intens=1.8) at(lagroll_internal_conflict_intens=2) atmeans post vsquish

coefplot m1, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of ICRC Treaties" " ", size(medsmall)) xtitle(" " "UCDP Internal Conflict Intensity", size(medsmall)) xlabel(1 `" "UCDP Intensity"  "Min" "' 2 " " 3 " " 4 " " 5 " " 6 " " 7 " " 8 " " 9 " " 10 " " 11 `" "UCDP Intensity"  "Max" "', grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Internal Threats")
*graph save "vdemFEInternalConflictTreatiesAME.gph", replace
graph export "vdemFEInternalConflictTreatiesAME.png", replace as(png)

* Lagged Treaties * External Conflict

quietly: xtreg log_pgm_count lagroll_internal_conflict_intens loglaggdppc_i c.lagtreaties_signed##c.lagroll_avg_hostlev vdem i.year, fe vce(robust)

eststo m3: margins, dydx(lagtreaties_signed) at(lagroll_avg_hostlev=0) at(lagroll_avg_hostlev=1) at(lagroll_avg_hostlev=2) at(lagroll_avg_hostlev=3) at(lagroll_avg_hostlev=4) at(lagroll_avg_hostlev=5) atmeans post vsquish

coefplot m3, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of ICRC Treaties" " ", size(medsmall)) xtitle(" " "Average MID Hostility Level", size(medsmall)) xlabel(1 "MID Hostility Min" 2 " " 3 " " 4 " " 5 " " 6 "MID Hostility Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("External Threats")
*graph save "vdemFEExternalConflictTreatiesAME.gph", replace
graph export "vdemFEExternalConflictTreatiesAME.png", replace as(png)

* Table A14: Alternative Regime Type Measures
estimates clear

eststo m1: xtlogit pgm2 lagroll_avg_hostlev lagtreaties_signed lagroll_internal_conflict_intens lagdemoc2 democinternalconflict2 loglaggdppc_i, re
eststo m2: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed lagroll_internal_conflict_intens democinternalconflict2 lagdemoc2 loglaggdppc_i i.year, fe
eststo m3: xtlogit pgm2 lagroll_internal_conflict_intens lagtreaties_signed lagdemoc2 lagroll_avg_hostlev democexternalconflict2 loglaggdppc_i, re
eststo m4: xtreg log_pgm_count lagroll_internal_conflict lagtreaties_signed lagdemoc2 lagroll_avg_hostlev democexternalconflict2 loglaggdppc_i i.year, fe 
eststo m5: xtlogit pgm2 lagroll_avg_hostlev lagtreaties_signed lagdemoc2 lagroll_internal_conflict_intens treatiesinternalconflict loglaggdppc_i, re
eststo m6: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed lagdemoc2 lagroll_internal_conflict_intens treatiesinternalconflict loglaggdppc_i i.year, fe
eststo m7: xtlogit pgm2 lagroll_internal_conflict_intens lagtreaties_signed lagdemoc2 lagroll_avg_hostlev treatiesexternalconflict loglaggdppc_i, re
eststo m8: xtreg log_pgm_count lagroll_internal_conflict lagtreaties_signed lagdemoc2 lagroll_avg_hostlev treatiesexternalconflict loglaggdppc_i i.year, fe

esttab m1 m2 m3 m4 m5 m6 m7 m8 using TableA14.rtf, replace t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc2 democinternalconflict2 democexternalconflict2 treatiesinternalconflict treatiesexternalconflict) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc2 democinternalconflict2 democexternalconflict2 treatiesinternalconflict treatiesexternalconflict)

esttab m1 m2 m3 m4 m5 m6 m7 m8 using TableA14.tex, replace f t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc2 democinternalconflict2 democexternalconflict2 treatiesinternalconflict treatiesexternalconflict) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc2 democinternalconflict2 democexternalconflict2 treatiesinternalconflict treatiesexternalconflict) mtitles("\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}") eqlabel(none)

* Figure A8: Alternative Polity
estimates clear
xtset ccode year

* Democracy * Internal conflict
quietly: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed i.lagdemoc2##c.lagroll_internal_conflict_intens loglaggdppc_i i.year, fe vce(robust)

eststo m1: margins, dydx(lagdemoc2) at(lagroll_internal_conflict_intens=0) at(lagroll_internal_conflict_intens=.2) at(lagroll_internal_conflict_intens=.4) at(lagroll_internal_conflict_intens=.6) at(lagroll_internal_conflict_intens=.8) at(lagroll_internal_conflict_intens=1) at(lagroll_internal_conflict_intens=1.2) at(lagroll_internal_conflict_intens=1.4) at(lagroll_internal_conflict_intens=1.6) at(lagroll_internal_conflict_intens=1.8) at(lagroll_internal_conflict_intens=2) atmeans post vsquish

coefplot m1, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Democracy" " ", size(medsmall)) xtitle(" " "UCDP Internal Conflict Intensity", size(medsmall)) xlabel(1 `" "UCDP Intensity"  "Min" "' 2 " " 3 " " 4 " " 5 " " 6 " " 7 " " 8 " " 9 " " 10 " " 11 `" "UCDP Intensity"  "Max" "', grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Internal Threats")
*graph save "altpolityFEInternalConflictDemocAME.gph", replace
graph export "altpolityFEInternalConflictDemocAME.png", replace as(png)

* Democracy * External conflict
quietly: xtreg log_pgm_count lagroll_internal_conflict_intens loglaggdppc_i i.lagdemoc2##c.lagroll_avg_hostlev lagtreaties_signed i.year, fe vce(robust)

eststo m3: margins, dydx(lagdemoc2) at(lagroll_avg_hostlev=0) at(lagroll_avg_hostlev=1) at(lagroll_avg_hostlev=2) at(lagroll_avg_hostlev=3) at(lagroll_avg_hostlev=4) at(lagroll_avg_hostlev=5) atmeans post vsquish

coefplot m3, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Democracy" " ", size(medsmall)) xtitle(" " "Average MID Hostility Level", size(medsmall)) xlabel(1 "MID Hostility Min" 2 " " 3 " " 4 " " 5 " " 6 "MID Hostility Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("External Threats")
*graph save "altpolityFEExternalConflictDemocAME.gph", replace
graph export "altpolityFEExternalConflictDemocAME.png", replace as(png)

* Lagged Treaties * Internal Conflict
quietly: xtreg log_pgm_count lagroll_avg_hostlev loglaggdppc_i c.lagtreaties_signed##c.lagroll_internal_conflict_intens lagdemoc2 i.year, fe vce(robust)

eststo m1: margins, dydx(lagtreaties_signed) at(lagroll_internal_conflict_intens=0) at(lagroll_internal_conflict_intens=.2) at(lagroll_internal_conflict_intens=.4) at(lagroll_internal_conflict_intens=.6) at(lagroll_internal_conflict_intens=.8) at(lagroll_internal_conflict_intens=1) at(lagroll_internal_conflict_intens=1.2) at(lagroll_internal_conflict_intens=1.4) at(lagroll_internal_conflict_intens=1.6) at(lagroll_internal_conflict_intens=1.8) at(lagroll_internal_conflict_intens=2) atmeans post vsquish

coefplot m1, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of ICRC Treaties" " ", size(medsmall)) xtitle(" " "UCDP Internal Conflict Intensity", size(medsmall)) xlabel(1 `" "UCDP Intensity"  "Min" "' 2 " " 3 " " 4 " " 5 " " 6 " " 7 " " 8 " " 9 " " 10 " " 11 `" "UCDP Intensity"  "Max" "', grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Internal Threats")
*graph save "altpolityFEInternalConflictTreatiesAME.gph", replace
graph export "altpolityFEInternalConflictTreatiesAME.png", replace as(png)

* Lagged Treaties * External Conflict

quietly: xtreg log_pgm_count lagroll_internal_conflict_intens loglaggdppc_i c.lagtreaties_signed##c.lagroll_avg_hostlev lagdemoc2 i.year, fe vce(robust)

eststo m3: margins, dydx(lagtreaties_signed) at(lagroll_avg_hostlev=0) at(lagroll_avg_hostlev=1) at(lagroll_avg_hostlev=2) at(lagroll_avg_hostlev=3) at(lagroll_avg_hostlev=4) at(lagroll_avg_hostlev=5) atmeans post vsquish

coefplot m3, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of ICRC Treaties" " ", size(medsmall)) xtitle(" " "Average MID Hostility Level", size(medsmall)) xlabel(1 "MID Hostility Min" 2 " " 3 " " 4 " " 5 " " 6 "MID Hostility Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("External Threats")
*graph save "altpolityFEExternalConflictTreatiesAME.gph", replace
graph export "altpolityFEExternalConflictTreatiesAME.png", replace as(png)

estimates clear

* Table A15: National Information Technology Capacity

* IDI
quietly eststo g1: regress log_pgm_count lagroll_internal_conflict_intens lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i loglagidi_i, robust cluster(ccode)

* GDP per capita
quietly eststo g2: regress log_pgm_count lagroll_internal_conflict_intens lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i , robust cluster(ccode)
graph export "TXGDPpercapita.png", replace as(png)

* High Tech Exports
quietly eststo g3: regress log_pgm_count lagroll_internal_conflict_intens lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i log_HighTechExports_lag , robust cluster(ccode)
graph export "TXHighTechExports.png", replace as(png)

* Patents
quietly eststo g4: regress log_pgm_count lagroll_internal_conflict_intens lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i log_PatentApps_lag , robust cluster(ccode)

* Science and Technology Articles
quietly eststo g5: regress log_pgm_count lagroll_internal_conflict_intens lagroll_avg_hostlev lagtreaties_signed lagpolity2 loglaggdppc_i log_SciTechArticles_lag , robust cluster(ccode)
graph export "TXSciTech.png", replace as(png)

esttab g1 g2 g3 g4 g5 using TableA15.rtf, replace t(3) scalars("ll Log Likelihood" F r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens lagtreaties_signed loglaggdppc_i loglagidi_i log_HighTechExports_lag log_PatentApps_lag log_SciTechArticles_lag) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens lagtreaties_signed loglaggdppc_i loglagidi_i log_HighTechExports_lag log_PatentApps_lag log_SciTechArticles_lag)

esttab g1 g2 g3 g4 g5 using TableA15.tex, replace f t(3) scalars("ll Log Likelihood" F r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens lagtreaties_signed loglaggdppc_i loglagidi_i log_HighTechExports_lag log_PatentApps_lag log_SciTechArticles_lag) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens lagtreaties_signed loglaggdppc_i loglagidi_i log_HighTechExports_lag log_PatentApps_lag log_SciTechArticles_lag)  mtitles("\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}") eqlabel(none)

* Table A16

estimates clear

eststo m1: xtlogit pgm2 lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens democinternalconflict loglaggdppc_i dcad_broad_US_Russia_filled MajorPower, re
eststo m2: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens democinternalconflict loglaggdppc_i dcad_broad_US_Russia_filled MajorPower i.year, fe
eststo m3: xtlogit pgm2 lagroll_internal_conflict_intens lagtreaties_signed lagdemoc lagroll_avg_hostlev democexternalconflict loglaggdppc_i dcad_broad_US_Russia_filled MajorPower, re
eststo m4: xtreg log_pgm_count lagroll_internal_conflict lagtreaties_signed lagdemoc lagroll_avg_hostlev democexternalconflict loglaggdppc_i dcad_broad_US_Russia_filled MajorPower i.year, fe
eststo m5: xtlogit pgm2 lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens treatiesinternalconflict loglaggdppc_i dcad_broad_US_Russia_filled MajorPower, re
eststo m6: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens treatiesinternalconflict loglaggdppc_i dcad_broad_US_Russia_filled MajorPower i.year, fe
eststo m7: xtlogit pgm2 lagroll_internal_conflict_intens lagtreaties_signed lagdemoc lagroll_avg_hostlev treatiesexternalconflict loglaggdppc_i dcad_broad_US_Russia_filled MajorPower, re
eststo m8: xtreg log_pgm_count lagroll_internal_conflict lagtreaties_signed lagdemoc lagroll_avg_hostlev treatiesexternalconflict loglaggdppc_i dcad_broad_US_Russia_filled MajorPower i.year, fe

esttab m1 m2 m3 m4 m5 m6 m7 m8 using TableA16.rtf, replace t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc dcad_broad_US_Russia_filled democinternalconflict democexternalconflict treatiesinternalconflict treatiesexternalconflict) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc dcad_broad_US_Russia_filled MajorPower democinternalconflict democexternalconflict treatiesinternalconflict treatiesexternalconflict)

esttab m1 m2 m3 m4 m5 m6 m7 m8 using TableA16.tex, replace f t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared" r2b r2_o r2_w) legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc dcad_broad_US_Russia_filled democinternalconflict democexternalconflict treatiesinternalconflict treatiesexternalconflict) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc dcad_broad_US_Russia_filled MajorPower democinternalconflict democexternalconflict treatiesinternalconflict treatiesexternalconflict) mtitles("\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}") eqlabel(none)

* Figure A9: Relationship with Major Power
estimates clear
xtset ccode year

* Democracy * Internal conflict
quietly: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed i.lagdemoc##c.lagroll_internal_conflict_intens loglaggdppc_i dcad_broad_US_Russia_filled MajorPower i.year, fe vce(robust)

eststo m1: margins, dydx(lagdemoc) at(lagroll_internal_conflict_intens=0) at(lagroll_internal_conflict_intens=.2) at(lagroll_internal_conflict_intens=.4) at(lagroll_internal_conflict_intens=.6) at(lagroll_internal_conflict_intens=.8) at(lagroll_internal_conflict_intens=1) at(lagroll_internal_conflict_intens=1.2) at(lagroll_internal_conflict_intens=1.4) at(lagroll_internal_conflict_intens=1.6) at(lagroll_internal_conflict_intens=1.8) at(lagroll_internal_conflict_intens=2) atmeans post vsquish

coefplot m1, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Democracy" " ", size(medsmall)) xtitle(" " "UCDP Internal Conflict Intensity", size(medsmall)) xlabel(1 "UCDP Intensity Min" 2 " " 3 " " 4 " " 5 " " 6 " " 7 " " 8 " " 9 " " 10 " " 11 "UCDP Intensity Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Internal Threats")
*graph save "alliances1FEInternalConflictDemocAME.gph", replace
graph export "alliances1FEInternalConflictDemocAME.png", replace as(png)

* Democracy * External conflict
quietly: xtreg log_pgm_count lagroll_internal_conflict_intens loglaggdppc_i i.lagdemoc##c.lagroll_avg_hostlev lagtreaties_signed dcad_broad_US_Russia_filled MajorPower i.year, fe vce(robust)

eststo m3: margins, dydx(lagdemoc) at(lagroll_avg_hostlev=0) at(lagroll_avg_hostlev=1) at(lagroll_avg_hostlev=2) at(lagroll_avg_hostlev=3) at(lagroll_avg_hostlev=4) at(lagroll_avg_hostlev=5) atmeans post vsquish

coefplot m3, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Democracy" " ", size(medsmall)) xtitle(" " "Average MID Hostility Level", size(medsmall)) xlabel(1 "MID Hostility Min" 2 " " 3 " " 4 " " 5 " " 6 "MID Hostility Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("External Threats")
*graph save "alliances1FEExternalConflictDemocAME.gph", replace
graph export "alliances1FEExternalConflictDemocAME.png", replace as(png)

* Lagged Treaties * Internal Conflict
quietly: xtreg log_pgm_count lagroll_avg_hostlev loglaggdppc_i c.lagtreaties_signed##c.lagroll_internal_conflict_intens lagdemoc dcad_broad_US_Russia_filled MajorPower i.year, fe vce(robust)

eststo m1: margins, dydx(lagtreaties_signed) at(lagroll_internal_conflict_intens=0) at(lagroll_internal_conflict_intens=.2) at(lagroll_internal_conflict_intens=.4) at(lagroll_internal_conflict_intens=.6) at(lagroll_internal_conflict_intens=.8) at(lagroll_internal_conflict_intens=1) at(lagroll_internal_conflict_intens=1.2) at(lagroll_internal_conflict_intens=1.4) at(lagroll_internal_conflict_intens=1.6) at(lagroll_internal_conflict_intens=1.8) at(lagroll_internal_conflict_intens=2) atmeans post vsquish

coefplot m1, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of ICRC Treaties" " ", size(medsmall)) xtitle(" " "UCDP Internal Conflict Intensity", size(medsmall)) xlabel(1 "UCDP Intensity Min" 2 " " 3 " " 4 " " 5 " " 6 " " 7 " " 8 " " 9 " " 10 " " 11 "UCDP Intensity Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Internal Threats")
*graph save "alliances1FEInternalConflictTreatiesAME.gph", replace
graph export "alliances1FEInternalConflictTreatiesAME.png", replace as(png)

* Lagged Treaties * External Conflict

quietly: xtreg log_pgm_count lagroll_internal_conflict_intens loglaggdppc_i c.lagtreaties_signed##c.lagroll_avg_hostlev lagdemoc dcad_broad_US_Russia_filled MajorPower i.year, fe vce(robust)

eststo m3: margins, dydx(lagtreaties_signed) at(lagroll_avg_hostlev=0) at(lagroll_avg_hostlev=1) at(lagroll_avg_hostlev=2) at(lagroll_avg_hostlev=3) at(lagroll_avg_hostlev=4) at(lagroll_avg_hostlev=5) atmeans post vsquish

coefplot m3, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of ICRC Treaties" " ", size(medsmall)) xtitle(" " "Average MID Hostility Level", size(medsmall)) xlabel(1 "MID Hostility Min" 2 " " 3 " " 4 " " 5 " " 6 "MID Hostility Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("External Threats")
*graph save "alliances1FEExternalConflictTreatiesAME.gph", replace
graph export "alliances1FEExternalConflictTreatiesAME.png", replace as(png)

estimates clear

* Table A17
eststo m1: xtlogit pgm2 lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens democinternalconflict loglaggdppc_i defense_USA defense_Russia, re
eststo m2: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens democinternalconflict loglaggdppc_i defense_USA defense_Russia i.year, fe
eststo m3: xtlogit pgm2 lagroll_internal_conflict_intens lagtreaties_signed lagdemoc lagroll_avg_hostlev democexternalconflict loglaggdppc_i defense_USA defense_Russia, re
eststo m4: xtreg log_pgm_count lagroll_internal_conflict lagtreaties_signed lagdemoc lagroll_avg_hostlev democexternalconflict loglaggdppc_i defense_USA defense_Russia i.year, fe
eststo m5: xtlogit pgm2 lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens treatiesinternalconflict loglaggdppc_i defense_USA defense_Russia, re
eststo m6: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens treatiesinternalconflict loglaggdppc_i defense_USA defense_Russia, fe
eststo m7: xtlogit pgm2 lagroll_internal_conflict_intens lagtreaties_signed lagdemoc lagroll_avg_hostlev treatiesexternalconflict loglaggdppc_i defense_USA defense_Russia, re
eststo m8: xtreg log_pgm_count lagroll_internal_conflict lagtreaties_signed lagdemoc lagroll_avg_hostlev treatiesexternalconflict loglaggdppc_i defense_USA defense_Russia i.year, fe

esttab m1 m2 m3 m4 m5 m6 m7 m8 using TableA17.tex, replace f t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared") legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc defense_USA defense_Russia democinternalconflict democexternalconflict treatiesinternalconflict treatiesexternalconflict) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc defense_USA defense_Russia democinternalconflict democexternalconflict treatiesinternalconflict treatiesexternalconflict) mtitles("\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}") eqlabel(none)

* Table A18
eststo m1: xtlogit pgm2 lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens democinternalconflict loglaggdppc_i dcad_non_procurement_US dcad_non_procurement_Russia, re
eststo m2: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens democinternalconflict loglaggdppc_i dcad_non_procurement_US dcad_non_procurement_Russia i.year, fe
eststo m3: xtlogit pgm2 lagroll_internal_conflict_intens lagtreaties_signed lagdemoc lagroll_avg_hostlev democexternalconflict loglaggdppc_i dcad_non_procurement_US dcad_non_procurement_Russia, re
eststo m4: xtreg log_pgm_count lagroll_internal_conflict lagtreaties_signed lagdemoc lagroll_avg_hostlev democexternalconflict loglaggdppc_i dcad_non_procurement_US dcad_non_procurement_Russia i.year, fe
eststo m5: xtlogit pgm2 lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens treatiesinternalconflict loglaggdppc_i dcad_non_procurement_US dcad_non_procurement_Russia, re
eststo m6: xtreg log_pgm_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens treatiesinternalconflict loglaggdppc_i dcad_non_procurement_US dcad_non_procurement_Russia, fe
eststo m7: xtlogit pgm2 lagroll_internal_conflict_intens lagtreaties_signed lagdemoc lagroll_avg_hostlev treatiesexternalconflict loglaggdppc_i dcad_non_procurement_US dcad_non_procurement_Russia, re
eststo m8: xtreg log_pgm_count lagroll_internal_conflict lagtreaties_signed lagdemoc lagroll_avg_hostlev treatiesexternalconflict loglaggdppc_i dcad_non_procurement_US dcad_non_procurement_Russia i.year, fe

esttab m1 m2 m3 m4 m5 m6 m7 m8 using TableA18.tex, replace f t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared") legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc dcad_non_procurement_US dcad_non_procurement_Russia democinternalconflict democexternalconflict treatiesinternalconflict treatiesexternalconflict) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc dcad_non_procurement_US dcad_non_procurement_Russia democinternalconflict democexternalconflict treatiesinternalconflict treatiesexternalconflict) mtitles("\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Smart Bombs\\Binary\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}") eqlabel(none)

* Table A19: Domestic Count
estimates clear

eststo m2: xtreg log_domestic_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens democinternalconflict loglaggdppc_i i.year, fe
eststo m4: xtreg log_domestic_count lagroll_internal_conflict lagtreaties_signed lagdemoc lagroll_avg_hostlev democexternalconflict loglaggdppc_i i.year, fe
eststo m6: xtreg log_domestic_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens treatiesinternalconflict loglaggdppc_i i.year, fe
eststo m8: xtreg log_domestic_count lagroll_internal_conflict lagtreaties_signed lagdemoc lagroll_avg_hostlev treatiesexternalconflict loglaggdppc_i i.year, fe

esttab m2 m4 m6 m8 using TableA19.tex, replace f t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared") legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict treatiesinternalconflict treatiesexternalconflict) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict treatiesinternalconflict treatiesexternalconflict) mtitles("\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}") eqlabel(none)

* Figure A10 Domestic Production

estimates clear
xtset ccode year

* Democracy * Internal conflict
quietly: xtreg log_domestic_count lagroll_avg_hostlev lagtreaties_signed i.lagdemoc##c.lagroll_internal_conflict_intens loglaggdppc_i dcad_broad_US_Russia_filled MajorPower i.year, fe vce(robust)

eststo m1: margins, dydx(lagdemoc) at(lagroll_internal_conflict_intens=0) at(lagroll_internal_conflict_intens=.2) at(lagroll_internal_conflict_intens=.4) at(lagroll_internal_conflict_intens=.6) at(lagroll_internal_conflict_intens=.8) at(lagroll_internal_conflict_intens=1) at(lagroll_internal_conflict_intens=1.2) at(lagroll_internal_conflict_intens=1.4) at(lagroll_internal_conflict_intens=1.6) at(lagroll_internal_conflict_intens=1.8) at(lagroll_internal_conflict_intens=2) atmeans post vsquish

coefplot m1, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Democracy" " ", size(medsmall)) xtitle(" " "UCDP Internal Conflict Intensity", size(medsmall)) xlabel(1 `" "UCDP Intensity"  "Min" "' 2 " " 3 " " 4 " " 5 " " 6 " " 7 " " 8 " " 9 " " 10 " " 11 `" "UCDP Intensity"  "Max" "', grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Internal Threats")
*graph save "domesticFEInternalConflictDemocAME.gph", replace
graph export "domesticFEInternalConflictDemocAME.png", replace as(png)

* Democracy * External conflict
quietly: xtreg log_domestic_count lagroll_internal_conflict_intens loglaggdppc_i i.lagdemoc##c.lagroll_avg_hostlev lagtreaties_signed dcad_broad_US_Russia_filled MajorPower i.year, fe vce(robust)

eststo m3: margins, dydx(lagdemoc) at(lagroll_avg_hostlev=0) at(lagroll_avg_hostlev=1) at(lagroll_avg_hostlev=2) at(lagroll_avg_hostlev=3) at(lagroll_avg_hostlev=4) at(lagroll_avg_hostlev=5) atmeans post vsquish

coefplot m3, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of Democracy" " ", size(medsmall)) xtitle(" " "Average MID Hostility Level", size(medsmall)) xlabel(1 "MID Hostility Min" 2 " " 3 " " 4 " " 5 " " 6 "MID Hostility Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("External Threats")
*graph save "domesticFEExternalConflictDemocAME.gph", replace
graph export "domesticFEExternalConflictDemocAME.png", replace as(png)

* Lagged Treaties * Internal Conflict
quietly: xtreg log_domestic_count lagroll_avg_hostlev loglaggdppc_i c.lagtreaties_signed##c.lagroll_internal_conflict_intens lagdemoc dcad_broad_US_Russia_filled MajorPower i.year, fe vce(robust)

eststo m1: margins, dydx(lagtreaties_signed) at(lagroll_internal_conflict_intens=0) at(lagroll_internal_conflict_intens=.2) at(lagroll_internal_conflict_intens=.4) at(lagroll_internal_conflict_intens=.6) at(lagroll_internal_conflict_intens=.8) at(lagroll_internal_conflict_intens=1) at(lagroll_internal_conflict_intens=1.2) at(lagroll_internal_conflict_intens=1.4) at(lagroll_internal_conflict_intens=1.6) at(lagroll_internal_conflict_intens=1.8) at(lagroll_internal_conflict_intens=2) atmeans post vsquish

coefplot m1, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of ICRC Treaties" " ", size(medsmall)) xtitle(" " "UCDP Internal Conflict Intensity", size(medsmall)) xlabel(1 `" "UCDP Intensity"  "Min" "' 2 " " 3 " " 4 " " 5 " " 6 " " 7 " " 8 " " 9 " " 10 " " 11 `" "UCDP Intensity"  "Max" "', grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("Internal Threats")
*graph save "domesticFEInternalConflictTreatiesAME.gph", replace
graph export "domesticFEInternalConflictTreatiesAME.png", replace as(png)

* Lagged Treaties * External Conflict

quietly: xtreg log_domestic_count lagroll_internal_conflict_intens loglaggdppc_i c.lagtreaties_signed##c.lagroll_avg_hostlev lagdemoc dcad_broad_US_Russia_filled MajorPower i.year, fe vce(robust)

eststo m3: margins, dydx(lagtreaties_signed) at(lagroll_avg_hostlev=0) at(lagroll_avg_hostlev=1) at(lagroll_avg_hostlev=2) at(lagroll_avg_hostlev=3) at(lagroll_avg_hostlev=4) at(lagroll_avg_hostlev=5) atmeans post vsquish

coefplot m3, mcolor(gs0) yline(0, lcolor("219 68 55") lpatt(shortdash)) vertical byopts(row(1)) levels(95 90) ytitle("AME of ICRC Treaties" " ", size(medsmall)) xtitle(" " "Average MID Hostility Level", size(medsmall)) xlabel(1 "MID Hostility Min" 2 " " 3 " " 4 " " 5 " " 6 "MID Hostility Max", grid labsize(small)) graphregion(fcolor(white) ifcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(white) ilcolor(white) ilstyle(white)) mfcolor("37 151 151") lcolor("37 151 151") mlcolor("37 151 151") mcolor("37 151 151") ciopts(lcolor("37 151 151" "37 151 151")) title("External Threats")
*graph save "domesticFEExternalConflictTreatiesAME.gph", replace
graph export "domesticFEExternalConflictTreatiesAME.png", replace as(png)

estimates clear

* Table A20

estimates clear
xtset ccode year, yearly
eststo m2: mixed log_pgm_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens democinternalconflict loglaggdppc_i || _all: R.ccode || _all: R.year
eststo m4: mixed log_pgm_count lagroll_internal_conflict lagtreaties_signed lagdemoc lagroll_avg_hostlev democexternalconflict loglaggdppc_i || _all: R.ccode || _all: R.year
eststo m6: mixed log_pgm_count lagroll_avg_hostlev lagtreaties_signed lagdemoc lagroll_internal_conflict_intens treatiesinternalconflict loglaggdppc_i || _all: R.ccode || _all: R.year
eststo m8: mixed log_pgm_count lagroll_internal_conflict lagtreaties_signed lagdemoc lagroll_avg_hostlev treatiesexternalconflict loglaggdppc_i || _all: R.ccode || _all: R.year

esttab m2 m4 m6 m8 using TableA20.rtf, replace t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared") legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict treatiesinternalconflict treatiesexternalconflict) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict treatiesinternalconflict treatiesexternalconflict)

esttab m2 m4 m6 m8 using TableA20.tex, replace f t(3) scalars("ll Log Likelihood" F "chi2 Chi Squared") legend label collabels(none) varlabels(_cons Constant) se(3) pr2 r2 b(3) star(* 0.10 ** 0.05 *** 0.01) nobaselevels order(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict treatiesinternalconflict treatiesexternalconflict) keep(lagroll_avg_hostlev lagroll_internal_conflict_intens loglaggdppc_i lagtreaties_signed lagdemoc democinternalconflict democexternalconflict treatiesinternalconflict treatiesexternalconflict) mtitles("\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}" "\shortstack{Logged Count of\\Smart Bombs\\b/SE}") eqlabel(none)

log close
